// import { postLoginWxMin } from '@/api/profile';
import { TestLoginWxMin } from '@/api/profile';
export default {
  // 命名空间
  namespaced: true,
  state: {
    userInfo:null
  },
  getters: {},
  mutations: {
    // 默认有个参数state，第二个为用户传入的数据
    setUserInfo(state, payload) {
      state.userInfo = payload
    }
  },
   actions: {
    //发起异步请求
    async fetchWxInfo(store,params) {
       const res = await TestLoginWxMin(params)
       //提交给mutations修改状态
       store.commit('setUserInfo',res.result)
    }
  },
};
